package com.example.springbootdemo.config;

import org.springframework.context.annotation.Configuration;

/**
 * created by han
 * time: 2022/2/1 0001 3:57
 */
@Configuration
public class RedisConfig {

//    @Bean
//    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory){
//        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
//        // 关联
//        redisTemplate.setConnectionFactory(factory);
//        // 设置key的序列化器
//        redisTemplate.setKeySerializer(new StringRedisSerializer());
//        // 设置value的序列化器
//        redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
//        return redisTemplate;
//    }

}
